Skip to content

Add Advanced Vulkan Compute tutorial #334

Open
gpx1000 wants to merge 6 commits into
KhronosGroup:mainfrom
gpx1000:Vulkan-Compute-advanced-tutorial
Open

Add Advanced Vulkan Compute tutorial #334
gpx1000 wants to merge 6 commits into
KhronosGroup:mainfrom
gpx1000:Vulkan-Compute-advanced-tutorial

Conversation

@gpx1000

@gpx1000 gpx1000 commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

sections on memory models OpenCL interoperation and SYCL interoperation.

Add comprehensive documentation covering Vulkan Memory Model (availability/visibility/domain operations), shared memory (LDS) with bank conflict details, memory consistency with GroupMemoryBarrierWithGroupSync, OpenCL C to SPIR-V pipeline (clspv), kernel portability guidelines, clvk layering, and tutorial conclusion. Include navigation entries for all new compute architecture sections.

gpx1000 added 2 commits March 16, 2026 15:36
…L, and conclusion

Add comprehensive documentation covering Vulkan Memory Model (availability/visibility/domain operations), shared memory (LDS) with bank conflict details, memory consistency with GroupMemoryBarrierWithGroupSync, OpenCL C to SPIR-V pipeline (clspv), kernel portability guidelines, clvk layering, and tutorial conclusion. Include navigation entries for all new compute architecture sections.
Add missing blank lines after list introduction paragraphs to ensure proper Markdown rendering of bullet points in "Developing for advanced compute" and "Community and Resources" sections.

@bashbaug bashbaug left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice tutorial but I think the way the "OpenCL on Vulkan" and "SYCL on Vulkan" topics are presented is a little confusing. If an OpenCL on Vulkan implementation has done its job, it would look and behave like any other OpenCL implementation. Note that we considered at one point whether OpenCL would need a "Vulkan profile" or similar for a layered implementation, but this does not seem to be required, and conformant implementations of OpenCL over Vulkan are shipping.

Would it make more sense to focus more on the advanced Vulkan compute features that these layered implementations are using, instead? The current chapter about unified shared memory is a good example. Are there other similar features that could be described in this tutorial?

@gpx1000

gpx1000 commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

Hi Ben, Thanks for the review. I can certainly remove the OpenCL and SYCL chapters and add more advanced features. We do have a VulkanML tutorial that covers some of the more advanced compute things that might go there instead (you can find that one in the gitlab MR for Vulkan-Tutorial.

I was hoping to provide a method of exposing developers learning Vulkan to OpenCL and SYCL, This seemed like the right topic area to provide such intersection point. However, I don't feel like it would hurt Vulkan's compute tutorial as a concept to remove OpenCL and SYCL entirely. Alternatively, I could add more details about both and make it a longer tutorial. Do you have guidance for what you think would make sense?

@gpx1000

gpx1000 commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

This is a nice tutorial but I think the way the "OpenCL on Vulkan" and "SYCL on Vulkan" topics are presented is a little confusing. If an OpenCL on Vulkan implementation has done its job, it would look and behave like any other OpenCL implementation. Note that we considered at one point whether OpenCL would need a "Vulkan profile" or similar for a layered implementation, but this does not seem to be required, and conformant implementations of OpenCL over Vulkan are shipping.

Would it make more sense to focus more on the advanced Vulkan compute features that these layered implementations are using, instead? The current chapter about unified shared memory is a good example. Are there other similar features that could be described in this tutorial?

I re-read this. I see what you're asking I think. Yes. Lemme iterate a bit and I'll come up with more things to add in for the similar feature set.

gpx1000 added 2 commits June 9, 2026 22:56
…an Compute chapter

Address all feedback received thus far.
Add accompanying samples for all chapters.
@gpx1000 gpx1000 requested review from EwanC and bashbaug June 11, 2026 04:35
@SaschaWillems

Copy link
Copy Markdown
Collaborator

Can you sync with master so the changes from #388 are available here?

@gpx1000

gpx1000 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Sorry didn't notify you that I did the merge :). It should be good to go for that issue.

@SaschaWillems

Copy link
Copy Markdown
Collaborator

Thanks 👍🏻

Going through the samples (which are pretty interesting btw.). I noticed two issues.

The BVH one looks like geometry is missing (should be a full cornell box I guess):

image

The performance optimization sample seems to have issues properly displaying the time unit in the windows terminal:

image

…ce optimization to output ASCII instead of UTF-8 char.
@gpx1000

gpx1000 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Both issues should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants